Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Add button to open up viewed spec file #646

Merged
merged 4 commits into from
Apr 28, 2020

Conversation

domharrington
Copy link
Member

@domharrington domharrington commented Apr 28, 2020

Benak uses this website to test OAS files that customers send us and he's asked for an easy way to view that spec file so I added a link to the currently viewed spec:

image


Also added the ability to enter a URL in the UI:

image

Inline form:

image

Disabled option in the dropdown showing the URL:

image


We now also support yaml files!

http://localhost:9966/reference/?url=https://petstore.swagger.io/v2/swagger.yaml
http://localhost:9966/?selected=https%3A%2F%2Fpetstore.swagger.io%2Fv2%2Fswagger.yaml&customUrl=true

Now the following both work:

http://localhost:9966/reference/?url=https://petstore.swagger.io/v2/swagger.yaml
http://localhost:9966/?selected=https%3A%2F%2Fpetstore.swagger.io%2Fv2%2Fswagger.yaml&customUrl=true
@erunion erunion added the type:enhancement A potential new feature to be added, or an improvement we could make label Apr 28, 2020
Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit but otherwise works perfectly!

example/src/ApiList.jsx Outdated Show resolved Hide resolved
Co-Authored-By: Jon Ursenbach <erunion@users.noreply.github.com>
@domharrington
Copy link
Member Author

Thanks! Will merge in once the build passes.

@domharrington domharrington merged commit b7d6b04 into master Apr 28, 2020
@domharrington domharrington deleted the feature/add-open-spec-button branch April 28, 2020 19:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement A potential new feature to be added, or an improvement we could make
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants